以下可以將
www.a.com/jkhdajlf23
後綴jkhdajlf23補捉到 往後傳遞 而不會視為網址
<VirtualHost *:80>
ServerName www.a.com
ServerAlias www.b.com www.d.com
DirectoryIndex index.html index.htm index.php
DocumentRoot /www/test/
<Directory "/www/test">
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/(.+?)$ ?$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ?p=$1 [L]
</IfModule>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>